1. Field of the Invention
The present invention relates to an information processing apparatus, and a control method therefor.
2. Description of the Related Art
MFPs (Multi Functional Peripherals) that are currently used are provided with a Web server function for executing processing in response to a request from a plurality of external devices on a network. Such an MFP provided with the Web server function executes a Web application in the MFP in response to a processing request received in accordance with Hypertext Transfer Protocol (HTTP). In such an HTTP processing request, a path to a Web application to be executed and the port number of the Web application are designated in the URL form. Upon the receipt of an HTTP request from an external device, the MFP executes a Web application identified based on the path and the port number of the Web application included in the HTTP request. Japanese Patent Laid-Open No. 2005-092811 proposes that if a Web application assigned to the port number indicated by a URL does not exist, an error message is transmitted as a response to an external device that is the transmission source of the HTTP request.
Japanese Patent Laid-Open No. 2006-277246 discloses a system so-called HTTP redirection for transferring an HTTP request in which the port number and the application path are designated to a Web application assigned to another port number. According to Japanese Patent Laid-Open No. 2006-277246, in a case in which an HTTP request for requesting a Web application assigned to the port number (for example, port 80) for an HTTP server to perform processing is received from an external device, an MFP causes the external device to automatically transmit an HTTP request to a Web application assigned to the port number (for example, port 443) for an HTTPS server (HTTP server using an SSL socket).
However, conventional technology has problems as described below. According to Japanese Patent Laid-Open No. 2006-277246, if an external device transmits an HTTP request designating port 80 for a Web application assigned to port 443, the MFP transmits, to the Web client (external device), an HTTP redirection message for causing that external device to automatically transmit the HTTP request to the Web application on port 443. According to the HTTP redirection system described in Japanese Patent Laid-Open No. 2006-277246, an external device can transmit an HTTP request, without being conscious of whether the port number of a Web application indicates port 80 or port 443.
However, according to Japanese Patent Laid-Open No. 2006-277246, HTTP redirection to the Web application on port 443 is performed with respect to all HTTP requests designating port 80. Consequently, HTTP redirection will be performed even with respect to a Web application for which HTTP redirection to port 443 does not need to be performed. As a result, for example, even an application that does not need to perform encrypted communication using the HTTPS server will perform encrypted communication, and thus communication performance will deteriorate.
An external device that is the transmission source of an HTTP request may be a dedicated Web client that requests only a specific Web application to perform processing, rather than a personal computer in which a general Web browser is installed. Such a dedicated Web client may not be able to interpret an HTTP redirection message from an MFP. If an HTTP redirection message is transmitted to the external device that cannot interpret the HTTP redirection message, the external device will not be able to communicate with the Web application of the MFP after that.